#ifndef EXTRACTGRAPH_H
#define EXTRACTGRAPH_H

#include <iostream>
#include <vector>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include "../multipleImage/multipleImage.h"
#include <opencv2/xfeatures2d/nonfree.hpp>

using namespace xfeatures2d;
using namespace cv;
using namespace std;

class ExtractGraph
{
public:

    vector<Mat> processImg;

    ExtractGraph();

    Mat extractBlueLayer(Mat src);
    Mat extractComponet(Mat  src, double thresh=200, double maxValue=255);
    Mat extractText(Mat src, double thresh=150, double threshBright=20, double maxValue=255);
    Mat extractLocal(Mat src, double thresh=20, double maxValue=255);


    Mat extractDev(Mat src, vector<Mat>& imgVector);
    Mat extractDev(Mat src, vector<Rect>& rectVector);

    void extractCircultPoints(Mat src, vector<vector<Point>>& circultVector);
    Mat extractCircultPoints(Mat src);
    void getProcessImg(Mat src);

    //提取特征
    Mat extractKeyPoints(const vector<Mat>& devImgVector,
                         vector<vector<KeyPoint>>& devKeyPointsVector,
                         int imgCols = 4,
                         int mode = NO_CHANGE);
    Mat extractKeyPoints(const Mat& templateImg,
                         vector<KeyPoint>& templateKeyPoints);

    //特征点描述
    void extractDescriptor( vector<Mat>& devImgVector,
                          vector<vector<KeyPoint>>& devKeyPointsVector,
                          vector<Mat>& devDescriptorVector);
    void extractDescriptor( Mat& templateImg,
                          vector<KeyPoint>& templateKeyPoints,
                          Mat& templateDescriptor);
};

#endif // EXTRACTGRAPH_H
